package org.easy.tool.res;

/**
 * @author wuxueli
 */

public enum ResultEnum implements IResult{

    /**
     *
     */
    SUCCESS(200,"请求成功"),

    FAIL(201,"请求失败");

    private final Integer code;

    private final String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取状态码
     *
     * @return Integer
     */
    @Override
    public Integer getCode() {
        return code;
    }

    /**
     * 获取消息
     *
     * @return String
     */
    @Override
    public String getMessage() {
        return message;
    }
}
